Open
Conversation
QoL-grayscale
Mistakes saved during validation
Update requirements.txt
Fixed loss.py for newer torch, fixed typo in hyps
kbegiedza
suggested changes
Jan 3, 2023
|
|
||
| def parse_model(d, ch): # model_dict, input_channels(3) | ||
| # Parse a YOLOv5 model.yaml dictionary | ||
| ch = [1] #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
There was a problem hiding this comment.
remove comment (maybe use passed value instead of overriding it)
| @@ -298,11 +301,13 @@ def _from_yaml(self, cfg): | |||
|
|
|||
| def parse_model(d, ch): # model_dict, input_channels(3) | |||
|
|
||
| [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) | ||
| ] | ||
| ch: 1 No newline at end of file |
| # Build strides, anchors | ||
| m = self.model[-1] # Detect() | ||
|
|
||
| ch = 1 |
| parser.add_argument('--save-period', type=int, default=-1, help='Save checkpoint every x epochs (disabled if < 1)') | ||
| parser.add_argument('--seed', type=int, default=0, help='Global training seed') | ||
| parser.add_argument('--local_rank', type=int, default=-1, help='Automatic DDP Multi-GPU argument, do not modify') | ||
| parser.add_argument('--rgb-mode', action='store_true', help='train model in rgb mode, with image_channels=3.') |
There was a problem hiding this comment.
not working now due to ch = 1 overrides in model / many places
| # ], p=0.7), | ||
| # A.Cutout(always_apply=False, p=0.7, num_holes=32, max_h_size=8, max_w_size=8) | ||
| # ], bbox_params=A.BboxParams(format='yolo', label_fields=['class_labels'])) | ||
| self.transform = A.Compose() |
|
|
||
| # HSV color-space | ||
| augment_hsv(img, hgain=hyp['hsv_h'], sgain=hyp['hsv_s'], vgain=hyp['hsv_v']) | ||
| if self.rgb_mode: |
| if not matched_detections.__contains__(detection_index): | ||
| wrong_detections.append(detections_batch[detection_index]) | ||
|
|
||
| all_mistakes = wrong_detections + wrong_detections_labels + not_detected_targets |
There was a problem hiding this comment.
maybe draw different mistakes with different colors ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update to yolov5v7 of branch grayscale, with rgb/grayscale switcher